package cn.smxy.vo;

import cn.smxy.pojo.PlantFamily;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;


@Data
@NoArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class PlantFamilyVo extends PlantFamily {
    private List<PlantFamilyVo> child;

    public PlantFamilyVo(PlantFamily plantFamily) {
        super(plantFamily.getFamilyId(), plantFamily.getFamilyName(),
                plantFamily.getParentId(), plantFamily.getCategoryId());
        child = new ArrayList<>();
    }
}
